// SerialPortButton.dart
import 'package:flutter/material.dart';

class FunctionButton extends StatelessWidget {
  final String title;
  final Color color;
  final VoidCallback onPressed;

  const FunctionButton({super.key, required this.onPressed, required this.title, required this.color});

  @override
  Widget build(BuildContext context) {
    return ElevatedButton(
      onPressed: onPressed,
      style: ElevatedButton.styleFrom(
        backgroundColor: color,
        shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(3)),
      ),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          Text(title, style: TextStyle(fontSize: 16,color: Colors.white)),
        ],
      ),
    );
  }


}
